<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexSourceEntityIdInTaskTable extends AbstractMigration
{
    public function up()
    {
        $this->table('task')
            ->addIndex(['source_entity_id'], ['type' => 'normal', 'name' => 'idx_source_entity_id'])
            ->save();
    }

    public function down()
    {
        $this->table('task')
            ->removeIndexByName('idx_source_entity_id')
            ->save();

    }
}
